package com.wwj.core.system.service;

import com.wwj.core.system.entity.Role;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Set;

/**
 * Created by xya on 16-10-24.
 */
public interface IRoleService {

    Role findRoleById(Integer id) throws Exception;

    Page findRoleByPage(int pageNo, int pageSize, String search) throws Exception;

    List<Role> findAllRole() throws Exception;

    Set<String> getRoleAsString(String userId) throws Exception;

    int createRole(Role role) throws Exception;

    int removeRole(Integer[] ids) throws Exception;

    int modifyRole(Role role) throws Exception;

    int createRoleMenu(Integer id, Integer[] menuIds) throws Exception;

    boolean validateId(Integer id) throws Exception;

    boolean validateCode(Integer id, String code) throws Exception;

    int saveOrUpdate(Role role) throws Exception;

    boolean checkRoleCode(String value) throws Exception;

    boolean checkRoleName(String value) throws Exception;
}
